1) Field of the Invention
The present invention relates to a server system which executes processing defined in an interface in response to a processing request, and enables inheritance of functionality between applications.
2) Description of the Related Art
In the recently developed client-server systems, client and server applications are linked so that a client application can request a server application to execute processing, and the server application can return a result of the processing to the client application. In the client-server systems, interfaces (groups of methods which can be used by other programs) of the server applications are defined, and development of client and server applications independent of programming languages of the other client and server applications in each client-server system is becoming possible. That is, when a client uses a method of a server, the client need only output a request in accordance with a predefined interface. Thus, the efficiency in development of distributed processing systems can be increased when the distributed processing systems are constructed by using the above interfaces.
Incidentally, extension of functionality of an existing interface is often required in an operating client-server system. Conventionally, when functionality of an existing interface is extended, it is necessary to newly produce a server application for executing processing corresponding to the extended functionality, and integrate the newly produced server application with an existing server application corresponding to the existing interface. If it is known that the existing server application is described in an object-oriented programming language such as C++ and Java (which is a registered trademark of Sun Microsystems, Inc.), and the above server application corresponding to the extended functionality is produced in the same object-oriented programming language as the existing server application, the interface having the extended functionality can inherit a portion of the existing interface. That is, when both of the existing and extended interface are described in an identical object-oriented programming language, the extended interface can be produced by utilizing a portion of the existing interface, and thus productivity of applications can be increased.
However, inheritance of an interface is possible only when server applications corresponding to existing and functionality-extended interfaces are described in an identical object-oriented programming language. That is, in the conventional client-server systems, a server application described in an object-oriented programming language cannot inherit from an interface of another server application described in a different object-oriented programming language. For example, only server applications described in the programming language C++ can inherit from an interface of another server application described in the programming language C++.
In addition, when a first server application is described in a first non-object-oriented programming language, and a second server application is described in a second programming language different from the first programming language, the second server application cannot inherit from an interface of the first server application regardless of whether the second programming language is object-oriented or not.
FIG. 13 indicates possibility of inheritance in various cases in which applications corresponding to ancestors and descendants are described in object-oriented and non-object-oriented programming languages. In FIG. 13, each blank circle (xe2x80x9cOxe2x80x9d) indicates that inheritance is possible, and each cross (xe2x80x9cXxe2x80x9d) indicates that inheritance is impossible.
As indicated in FIG. 13, the inheritance is possible only in the very limited case. In addition, when a user wishes to extend functionality of an interface of a server application which is supplied from a computer manufacturer or the like, generally, the programming language which describes the server application is unknown to the user.
Further, in the case where inheritance is impossible, it is necessary to produce a routine for re-requesting existing server applications to execute existing methods, as well as a server application corresponding to a new interface. However, it is a time-consuming job to produce the above routine for all of the existing methods which are required to be used in the new interface.
The object of the present invention is to provide a server system which enables a first program to easily inherit a method of a second program, regardless of whether the programming languages of the first and second programs are identical or not.
(1) According to the first aspect of the present invention, there is provided a server system comprising: a plurality of processing units which execute processing in accordance with a plurality of types of processing requests; an information holding unit which holds information on one of the plurality of processing units which should execute processing in response to each of the plurality of types of processing requests; a processing-request receiving unit which receives a processing request; a determining unit which determines one of the plurality of processing units as a processing unit which executes the processing request received by the processing-request receiving unit, based on the information held by the information holding unit; and a calling unit which calls the one of the plurality of processing units so that the one of the plurality of processing units executes the processing request received by the processing-request receiving unit.
The server system according to the first aspect of the present invention may have one or any possible combination of the following additional features (i) and (ii).
(i) The plurality of processing units execute processing in accordance with a plurality of definitions in a plurality of interfaces.
(ii) The information held by the information holding unit indicates at least one first method defined in a first one of the plurality of interfaces corresponding to each of the plurality of processing units and at least one ancestor interface from which the first one of the plurality of interfaces inherits. The processing request received by the processing-request receiving unit designates a second one of the plurality of interfaces, and requests execution of a second method. The determining unit determines, as the processing unit which executes the processing request received by the processing-request receiving unit, one of the plurality of processing units corresponding to the second one of the plurality of interfaces when the second one of the plurality of interfaces defines the second method. The determining unit determines, as the processing unit which executes the processing request received by the processing-request receiving unit, one of the plurality of processing units corresponding to one of the at least one ancestor interface from which the second one of the plurality of interfaces inherits, when the second one of the plurality of interfaces does not define the second method, and the one of the at least one ancestor interface from which the second one of the plurality of interfaces inherits defines the second method.
(2) According to the second aspect of the present invention, there is provided a server system comprising a plurality of servers each of which includes: a plurality of processing units which execute processing in accordance with a plurality of types of processing requests; an information holding unit which holds information on one of the plurality of processing units which should execute processing in response to each of the plurality of types of processing requests; a processing-request receiving unit which receives a processing request; a determining unit which determines one of the plurality of processing units as a processing unit which executes the processing request received by the processing-request receiving unit, based on the information held by the information holding unit; and a calling unit which calls the one of the plurality of processing units so that the one of the plurality of processing units executes the processing request received by the processing-request receiving unit. The server system further comprises a location-information holding unit which holds an identifier of a first one of the plurality of servers in which each of the plurality of processing units is implemented, together with a name indicating a functional feature of the processing unit, an inquiry receiving unit which receives an inquiry designating a name of a processing function of a second one of the plurality of processing units, and a responding unit which acquires from the location-information holding unit an identifier of a second one of the plurality of servers in which the second one of the plurality of processing units is implemented, and outputs a response to the inquiry in which the identifier of the second one of the plurality of servers is indicated.
The server system according to the second aspect of the present invention may have one or any possible combination of the aforementioned additional features (i) and (ii).
(3) According to the third aspect of the present invention, there is provided a computer-readable storage medium storing a program which instructs a computer to realize the server according to the first aspect of the present invention.
The server system realized with the computer-readable storage medium according to the third aspect of the present invention may have one or any possible combination of the aforementioned additional features (i) and (ii).
As described above, in the server system according to the present invention, a processing unit which executes a processing request received by the processing-request receiving unit is determined based on information held by the information holding unit. When a processing unit is newly added to the server system, and the newly added processing unit cannot execute at least one desired method which at least one existing processing unit has, the additional processing unit becomes able to inherit the at least one desired method of the at least one existing processing unit by merely setting in the information holding unit information which enables execution of the at least one desired method by the at least one existing processing unit. Thus, inheritance of methods between processing units becomes possible even when the programming languages which describe the processing units are different.
The above and other objects, features and advantages of the present invention will become apparent from the following description when taken in conjunction with the accompanying drawings which illustrate preferred embodiment of the present invention by way of example.